package com.hillstone.app.controller;

import com.hillstone.app.anno.RedisLock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author dengliu
 */
@RestController
public class HelloController {


    @Autowired
    private ApplicationContext context;

//    @RedisLock(lockName = "LockName",releaseTime = 100,timeUnit = TimeUnit.SECONDS)
    @RequestMapping("/hello")
    public String hello(){
        return  context.toString();

    }

}
